function getContextPath(){ 
	var pathName = document.location.pathname; 
	var index = pathName.substr(1).indexOf("/"); 
	var result = pathName.substr(0,index+1); 
	return result; 
}

$(function(){
	var annexUrl = $("#annex").text();
	var img = "<a class='fancybox' href='"+getContextPath()+annexUrl+"'><img src='"+getContextPath()+annexUrl+"' style='width:150px; height:150px' /></a>";

	if (annexUrl.length != 0) {
		$("#annex").html(img);
	} else {
		$("#annex").text(无);
	}
	
})